﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="ThietBiSo.LinQDB" %>
<%@ Import Namespace="ThietBiSo.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
     Website - bảng điều khiển
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   <script type="text/javascript">
       function submitForm() {
           var F = document.forms[0];

           document.forms[0].submit();
       } 
    </script>

    <%
   
        MLoaiOnline mmdt = new MLoaiOnline();
        var mangdt = mmdt.FindAll();
    %>
    <% using (Html.BeginForm("Create", "online", FormMethod.Post, new { @enctype = "multipart/form-data" }))
       { %>
    <%: Html.ValidationSummary(true) %>
    <table>
        
    </table>
    <fieldset>
        <legend class="classFieldSet">Thêm mới hỗ trợ</legend>
        <table width="100%">
        <tr>
            <td class="classCreate">
                <input type="button" value="Thêm" class="btn" onclick="submitForm();" />
            </td>           
            <td class="classBack">
                <%: Html.ActionLink("Quay lại", "Index",null,new { @class = "classThem" })%>
            </td>
        </tr>
            <tr>
                <td class="tableLabel">
                    Loại hỗ trợ
                </td>
                <td class="tableField">
                    <%: Html.DropDownList("ddlLoaiOnline", new SelectList(mangdt, "MaLoaiOnline", "TenLoaiOnline"), "Chọn loại hỗ trợ", new { @style = "width:605px"})%>
                </td>
            </tr>
            <tr>
                <td class="tableLabel">
                    Tiêu đề
                </td>
                <td class="tableField">
                    <%:Html.TextBox("TieuDe", null, new { @style="width:600px" })%>
                </td>
            </tr>           
            
            <tr>
                <td class="tableLabel">
                    Nick/email/điện thoại
                </td>
                <td class="tableField">
                    <%:Html.TextBox("TenOnline",null, new { @style = "width:600px" })%>
                </td>
            </tr>
             
        </table>        
    </fieldset>
    <% } %>


</asp:Content>
